package project2011;
import java.util.*;

/**
 * Manages user details
 * @author Antone Gonzalez
 */
public class User {
    
    /**
     * constructor for user 
     * @param name the name of this user
     * @param password the password for this user
     */
    public User(String name, String password)
    {
        this.name = name;
        this.password = password;
        ProductList shoppingCart = new ProductList();
    }
    
    /**
     * accessor for user name
     * @return the name of this user
     */
    public String getName()
    {
        return this.name;
    }
    
    /**
     * accessor for password
     * @return this password
     */
    public String getPassword()
    {
        return this.password;
    }
    
    /**
     * returns a string with the details of this user
     * @return a string with the details of this user
     */
    public String print()
    {
        String result = name + ",";
        result += password + ",\n";
        
        return result;
    }
    
    /**
     * accessor for shopping cart
     * @return this shopping cart
     */
    public ProductList getShoppingCart()
    {
        return shoppingCart;
    }
    
    private String name;
    private String password;
    protected ProductList shoppingCart;
}
